package com.telit.firecommand.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Setter;


public class PageVo {

    @Setter
    @ApiModelProperty(value = "当前页面")
    private Integer pageNo;

    @Setter
    @ApiModelProperty(value = "页面大小")
    private Integer pageSize;

    public Integer getPageNo() {
        if (pageNo == null) {
            pageNo = 1;
        }
        return pageNo;
    }

    public Integer getPageSize() {
        if (pageSize == null) {
            pageSize = 10;
        } else if (pageSize < 1) {
            pageSize = 1;
        } else if (pageSize > 100) {
            pageSize = 100;
        }
        return pageSize;
    }

}
